package com.shop.cereshop.app.dao.buyer;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.cereshop.app.page.recommend.RecommendPageVO;
import com.shop.cereshop.commons.domain.buyer.CereBuyerVisitor;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper
public interface CereBuyerVisitorDAO extends BaseMapper<CereBuyerVisitor> {

    Integer updateStatue(CereBuyerVisitor existingRecord);

    List<CereBuyerVisitor> selectByVisitedId(@Param("visitedId") Long visitedId);

    void updateVisitedStatue(Long buyerUserId);

    List<RecommendPageVO> selectUserBrowseHistory(Long userId);

    Integer deleteUserBrowseHistory(@Param("type") Integer type, @Param("buyerUserId") Long buyerUserId);

    Integer deleteUserHistory(@Param("userIds") List<Long> userIds, @Param("buyerUserId") Long buyerUserId);
}
